home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / mdishe / constant.bas < prev    next >
BASIC Source File  |  1994-12-26  |  10KB  |  268 lines

  1. ''''''''''''''''''''''''''''
  2. ' Visual Basic global constant file. This file can be loaded
  3. ' into a code module.
  4. '
  5. ' Some constants are commented out because they have
  6. ' duplicates (e.g., NONE appears several places).
  7. '
  8. ' If you are updating a Visual Basic application written with
  9. ' an older version, you should replace your global constants
  10. ' with the constants in this file.
  11. '
  12. ''''''''''''''''''''''''''''
  13.  
  14.  
  15. ' General
  16.  
  17.  
  18. ' Show parameters
  19. Global Const MODAL = 1
  20. Global Const MODELESS = 0
  21.  
  22.  
  23. ' Colors
  24. Global Const BLACK = &H0&
  25. Global Const RED = &HFF&
  26. Global Const GREEN = &HFF00&
  27. Global Const YELLOW = &HFFFF&
  28. Global Const BLUE = &HFF0000
  29. Global Const MAGENTA = &HFF00FF
  30. Global Const CYAN = &HFFFF00
  31. Global Const WHITE = &HFFFFFF
  32.  
  33. ' Function Parameters
  34. ' MsgBox parameters
  35. Global Const MB_OK = 0                 ' OK button only
  36. Global Const MB_OKCANCEL = 1           ' OK and Cancel buttons
  37. Global Const MB_ABORTRETRYIGNORE = 2   ' Abort, Retry, and Ignore buttons
  38. Global Const MB_YESNOCANCEL = 3        ' Yes, No, and Cancel buttons
  39. Global Const MB_YESNO = 4              ' Yes and No buttons
  40. Global Const MB_RETRYCANCEL = 5        ' Retry and Cancel buttons
  41.  
  42. Global Const MB_ICONSTOP = 16          ' Critical message
  43. Global Const MB_ICONQUESTION = 32      ' Warning query
  44. Global Const MB_ICONEXCLAMATION = 48   ' Warning message
  45. Global Const MB_ICONINFORMATION = 64   ' Information message
  46.  
  47. Global Const MB_APPLMODAL = 0          ' Application Modal Message Box
  48. Global Const MB_DEFBUTTON1 = 0         ' First button is default
  49. Global Const MB_DEFBUTTON2 = 256       ' Second button is default
  50. Global Const MB_DEFBUTTON3 = 512       ' Third button is default
  51. Global Const MB_SYSTEMMODAL = 4096      'System Modal
  52.  
  53. ' MsgBox return values
  54. Global Const IDOK = 1                  ' OK button pressed
  55. Global Const IDCANCEL = 2              ' Cancel button pressed
  56. Global Const IDABORT = 3               ' Abort button pressed
  57. Global Const IDRETRY = 4               ' Retry button pressed
  58. Global Const IDIGNORE = 5              ' Ignore button pressed
  59. Global Const IDYES = 6                 ' Yes button pressed
  60. Global Const IDNO = 7                  ' No button pressed
  61.  
  62.  
  63. 'Common Dialog Control
  64. 'Action Property
  65. Global Const DLG_FILE_OPEN = 1
  66. Global Const DLG_FILE_SAVE = 2
  67. Global Const DLG_COLOR = 3
  68. Global Const DLG_FONT = 4
  69. Global Const DLG_PRINT = 5
  70. Global Const DLG_HELP = 6
  71.  
  72. 'File Open/Save Dialog Flags
  73. Global Const OFN_READONLY = &H1&
  74. Global Const OFN_OVERWRITEPROMPT = &H2&
  75. Global Const OFN_HIDEREADONLY = &H4&
  76. Global Const OFN_NOCHANGEDIR = &H8&
  77. Global Const OFN_SHOWHELP = &H10&
  78. Global Const OFN_NOVALIDATE = &H100&
  79. Global Const OFN_ALLOWMULTISELECT = &H200&
  80. Global Const OFN_EXTENSIONDIFFERENT = &H400&
  81. Global Const OFN_PATHMUSTEXIST = &H800&
  82. Global Const OFN_FILEMUSTEXIST = &H1000&
  83. Global Const OFN_CREATEPROMPT = &H2000&
  84. Global Const OFN_SHAREAWARE = &H4000&
  85. Global Const OFN_NOREADONLYRETURN = &H8000&
  86.  
  87. 'Printer Dialog Flags
  88. Global Const PD_ALLPAGES = &H0&
  89. Global Const PD_SELECTION = &H1&
  90. Global Const PD_PAGENUMS = &H2&
  91. Global Const PD_NOSELECTION = &H4&
  92. Global Const PD_NOPAGENUMS = &H8&
  93. Global Const PD_COLLATE = &H10&
  94. Global Const PD_PRINTTOFILE = &H20&
  95. Global Const PD_PRINTSETUP = &H40&
  96. Global Const PD_NOWARNING = &H80&
  97. Global Const PD_RETURNDC = &H100&
  98. Global Const PD_RETURNIC = &H200&
  99. Global Const PD_RETURNDEFAULT = &H400&
  100. Global Const PD_SHOWHELP = &H800&
  101. Global Const PD_USEDEVMODECOPIES = &H40000
  102. Global Const PD_DISABLEPRINTTOFILE = &H80000
  103. Global Const PD_HIDEPRINTTOFILE = &H100000
  104.  
  105. 'Help Constants
  106. Global Const HELP_CONTEXT = &H1           'Display topic in ulTopic
  107. Global Const HELP_QUIT = &H2              'Terminate help
  108. Global Const HELP_INDEX = &H3             'Display index
  109. Global Const HELP_CONTENTS = &H3
  110. Global Const HELP_HELPONHELP = &H4        'Display help on using help
  111. Global Const HELP_SETINDEX = &H5          'Set the current Index for multi index help
  112. Global Const HELP_SETCONTENTS = &H5
  113. Global Const HELP_CONTEXTPOPUP = &H8
  114. Global Const HELP_FORCEFILE = &H9
  115. Global Const HELP_KEY = &H101             'Display topic for keyword in offabData
  116. Global Const HELP_COMMAND = &H102
  117. Global Const HELP_PARTIALKEY = &H105      'call the search engine in winhelp
  118.  
  119.  
  120. '
  121. ' Data Access constants
  122. '
  123. 'Data control
  124. 'Error event Response arguments
  125. Global Const DATA_ERRCONTINUE = 0
  126. Global Const DATA_ERRDISPLAY = 1
  127.  
  128. 'Editmode property values
  129. Global Const DATA_EDITNONE = 0
  130. Global Const DATA_EDITMODE = 1
  131. Global Const DATA_EDITADD = 2
  132.  
  133. ' Options property values
  134. Global Const DATA_DENYWRITE = &H1
  135. Global Const DATA_DENYREAD = &H2
  136. Global Const DATA_READONLY = &H4
  137. Global Const DATA_APPENDONLY = &H8
  138. Global Const DATA_INCONSISTENT = &H10
  139. Global Const DATA_CONSISTENT = &H20
  140. Global Const DATA_SQLPASSTHROUGH = &H40
  141.  
  142.  
  143. 'Validate event Action arguments
  144. Global Const DATA_ACTIONCANCEL = 0
  145. Global Const DATA_ACTIONMOVEFIRST = 1
  146. Global Const DATA_ACTIONMOVEPREVIOUS = 2
  147. Global Const DATA_ACTIONMOVENEXT = 3
  148. Global Const DATA_ACTIONMOVELAST = 4
  149. Global Const DATA_ACTIONADDNEW = 5
  150. Global Const DATA_ACTIONUPDATE = 6
  151. Global Const DATA_ACTIONDELETE = 7
  152. Global Const DATA_ACTIONFIND = 8
  153. Global Const DATA_ACTIONBOOKMARK = 9
  154. Global Const DATA_ACTIONCLOSE = 10
  155. Global Const DATA_ACTIONUNLOAD = 11
  156.  
  157.  
  158.  
  159. ' Option argument values (CreateDynaset, etc)
  160. Global Const DB_DENYWRITE = &H1
  161. Global Const DB_DENYREAD = &H2
  162. Global Const DB_READONLY = &H4
  163. Global Const DB_APPENDONLY = &H8
  164. Global Const DB_INCONSISTENT = &H10
  165. Global Const DB_CONSISTENT = &H20
  166. Global Const DB_SQLPASSTHROUGH = &H40
  167.  
  168. ' SetDataAccessOption
  169. Global Const DB_OPTIONINIPATH = 1
  170.  
  171. ' Field Attributes
  172. Global Const DB_FIXEDFIELD = &H1
  173. Global Const DB_VARIABLEFIELD = &H2
  174. Global Const DB_AUTOINCRFIELD = &H10
  175. Global Const DB_UPDATABLEFIELD = &H20
  176.  
  177. ' Field Data Types
  178. Global Const DB_BOOLEAN = 1
  179. Global Const DB_BYTE = 2
  180. Global Const DB_INTEGER = 3
  181. Global Const DB_LONG = 4
  182. Global Const DB_CURRENCY = 5
  183. Global Const DB_SINGLE = 6
  184. Global Const DB_DOUBLE = 7
  185. Global Const DB_DATE = 8
  186. Global Const DB_TEXT = 10
  187. Global Const DB_LONGBINARY = 11
  188. Global Const DB_MEMO = 12
  189.  
  190. ' TableDef Attributes
  191. Global Const DB_ATTACHEXCLUSIVE = &H10000
  192. Global Const DB_ATTACHSAVEPWD = &H20000
  193. Global Const DB_SYSTEMOBJECT = &H80000002
  194. Global Const DB_ATTACHEDTABLE = &H40000000
  195. Global Const DB_ATTACHEDODBC = &H20000000
  196.  
  197. ' ListTables TableType
  198. Global Const DB_TABLE = 1
  199. Global Const DB_QUERYDEF = 5
  200.  
  201. ' ListTables Attributes (for QueryDefs)
  202. Global Const DB_QACTION = &HF0
  203. Global Const DB_QCROSSTAB = &H10
  204. Global Const DB_QDELETE = &H20
  205. Global Const DB_QUPDATE = &H30
  206. Global Const DB_QAPPEND = &H40
  207. Global Const DB_QMAKETABLE = &H50
  208.  
  209. ' ListIndexes IndexAttributes values
  210. Global Const DB_UNIQUE = 1
  211. Global Const DB_PRIMARY = 2
  212. Global Const DB_PROHIBITNULL = 4
  213. Global Const DB_IGNORENULL = 8
  214. ' ListIndexes FieldAttributes value
  215. Global Const DB_DESCENDING = 1  'For each field in Index
  216.  
  217. ' CreateDatabase and CompactDatabase Language constants
  218. Global Const DB_LANG_GENERAL = ";LANGID=0x0809;CP=1252;COUNTRY=0"
  219. Global Const DB_LANG_SPANISH = ";LANGID=0x040A;CP=1252;COUNTRY=0"
  220. Global Const DB_LANG_DUTCH = ";LANGID=0x0413;CP=1252;COUNTRY=0"
  221. Global Const DB_LANG_SWEDFIN = ";LANGID=0x040C;CP=1252;COUNTRY=0"   'VB3 and Access 1.1 Databases
  222. Global Const DB_LANG_NORWDAN = ";LANGID=0x0414;CP=1252;COUNTRY=0"   'VB3 and Access 1.1 Databases
  223. Global Const DB_LANG_ICELANDIC = ";LANGID=0x040F;CP=1252;COUNTRY=0" 'VB3 and Access 1.1 Databases
  224. Global Const DB_LANG_NORDIC = ";LANGID=0x041D;CP=1252;COUNTRY=0"    'Access 1.0 Databases only
  225.  
  226. ' CreateDatabase and CompactDatabase options
  227. Global Const DB_VERSION10 = 1        ' Microsoft Access Version 1.0
  228. Global Const DB_ENCRYPT = 2          ' Make database encrypted.
  229. Global Const DB_DECRYPT = 4          ' Decrypt database while compacting.
  230.  
  231. 'Collating order values
  232. Global Const DB_SORTGENERAL = 256    ' Sort by EFGPI rules (English, French, German,Portuguese, Italian)
  233. Global Const DB_SORTSPANISH = 258    ' Sort by Spanish rules
  234. Global Const DB_SORTDUTCH = 259      ' Sort by Du